package com.alibaba.citrus.cr.sales.plan.api.salesplan.report;

import com.alibaba.citrus.cr.sales.plan.dto.api.request.SalesPlanReportCallBackRequest;
import com.alibaba.citrus.cr.sales.plan.dto.api.request.SalesPlanReportRequest;
import com.alibaba.citrus.cr.sales.plan.dto.api.response.SalesPlanReportCallBackResponse;
import com.alibaba.citrus.cr.sales.plan.sdo.SalesPlanReportSDO;
import com.alibaba.lattice2.epoch.meshflow.model.annotation.MeshFlowService;
import com.alibaba.lattice2.epoch.sdk.model.Result;

@MeshFlowService(apps = {"bc_order"}, name = "salesPlanReportWriteService")
public interface SalesPlanReportWriteService {

    /**
     * 计划提报-根据明细创建提报单
     *
     * @param salesPlanReportRequest
     * @return
     */
    Result<Boolean> report(SalesPlanReportRequest salesPlanReportRequest);

    /**
     * 计划提报-提报单重开（审批通过后被驳回）
     *
     * @param salesPlanReportSDO
     * @return
     */
    Result<Boolean> reOpen(SalesPlanReportSDO salesPlanReportSDO);

    /**
     * 计划提报-提报单撤回（审批通过前撤回）
     *
     * @param salesPlanReportSDO
     * @return
     */
    Result<Boolean> reSendBack(SalesPlanReportSDO salesPlanReportSDO);

    /**
     * 提交至CRM
     *
     * @param salesPlanReportRequest
     * @return
     */
    Result<Boolean> submitToCRM(SalesPlanReportRequest salesPlanReportRequest);

    /**
     * 更新提报单
     * @param salesPlanReportSDO
     * @return
     */
    Result<Boolean> edit(SalesPlanReportSDO salesPlanReportSDO);

    /**
     * 计划提报CRM回调
     * @param salesPlanReportCallBackRequest
     * @return
     */
    Result<SalesPlanReportCallBackResponse> submitToCRMCallBack(SalesPlanReportCallBackRequest salesPlanReportCallBackRequest);

}
